.class public Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;
.super Ljava/lang/Object;
.source "SprayDisplayer.java"


# static fields
.field private static MAX_POINTS_IN_POLY:I = 0x28

.field private static bearingTolerance:D = 1.0


# instance fields
.field private area:D

.field private bearing:D

.field private color:I

.field private color2:I

.field private counter:I

.field private cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

.field private currentArea:D

.field private finalls:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field

.field private lastbearing:D

.field private lefts:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;",
            ">;"
        }
    .end annotation
.end field

.field private mids:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field

.field private poly:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/PolygonOptions;",
            ">;"
        }
    .end annotation
.end field

.field private pt1:Lcom/google/android/gms/maps/model/LatLng;

.field private pt2:Lcom/google/android/gms/maps/model/LatLng;

.field private rights:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;",
            ">;"
        }
    .end annotation
.end field

.field private sprayWidth:D

.field private sprayedPolyOptions:Lcom/google/android/gms/maps/model/PolygonOptions;

.field private tolerancePoints:I


# direct methods
.method public constructor <init>(D)V
    .locals 4

    .line 53
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-wide/high16 v0, 0x4014000000000000L    # 5.0

    .line 32
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const v0, -0x4eff0100

    .line 39
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->color:I

    const v0, -0x4ef00100

    .line 40
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->color2:I

    .line 54
    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    .line 55
    iget-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v2, 0x40091eb851eb851fL    # 3.14

    mul-double v0, v0, v2

    const-wide/high16 v2, 0x4000000000000000L    # 2.0

    div-double/2addr v0, v2

    double-to-int v0, v0

    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->tolerancePoints:I

    const/4 v0, 0x0

    .line 56
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->counter:I

    const-wide/16 v0, 0x0

    .line 57
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->area:D

    .line 58
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->currentArea:D

    div-double/2addr p1, v2

    .line 59
    iput-wide p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    return-void
.end method

.method private calculateCurrentPolygonArea()D
    .locals 2

    .line 446
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_0

    .line 447
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->getPoints()Ljava/util/List;

    move-result-object v0

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Mathematics;->calculateArea(Ljava/util/List;)D

    move-result-wide v0

    goto :goto_0

    :cond_0
    const-wide/16 v0, 0x0

    :goto_0
    return-wide v0
.end method

.method private findIntersectionIndx(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Ljava/util/List;I)Z
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/android/gms/maps/model/LatLng;",
            "Lcom/google/android/gms/maps/model/LatLng;",
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;",
            ">;I)Z"
        }
    .end annotation

    const/4 v0, 0x0

    if-eqz p3, :cond_0

    .line 234
    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result v1

    if-lt v1, p4, :cond_0

    const/4 v1, 0x2

    .line 235
    new-array v2, v1, [Lcom/google/android/gms/maps/model/LatLng;

    aput-object p1, v2, v0

    const/4 p1, 0x1

    aput-object p2, v2, p1

    .line 236
    new-array p2, v1, [Lcom/google/android/gms/maps/model/LatLng;

    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, p4

    invoke-interface {p3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    aput-object v1, p2, v0

    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result v0

    sub-int/2addr v0, p4

    invoke-interface {p3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p3

    check-cast p3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {p3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object p3

    aput-object p3, p2, p1

    .line 237
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {p1, v2, p2}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result p1

    return p1

    :cond_0
    return v0
.end method

.method private formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;
    .locals 2

    const/4 v0, 0x2

    .line 458
    new-array v0, v0, [Lcom/google/android/gms/maps/model/LatLng;

    const/4 v1, 0x0

    aput-object p1, v0, v1

    const/4 p1, 0x1

    aput-object p2, v0, p1

    return-object v0
.end method

.method private getDifference(DD)D
    .locals 7

    sub-double v0, p1, p3

    const-wide v2, 0x4076800000000000L    # 360.0

    const-wide/16 v4, 0x0

    cmpg-double v6, v0, v4

    if-gez v6, :cond_0

    add-double/2addr v0, v2

    :cond_0
    sub-double/2addr p3, p1

    cmpg-double p1, p3, v4

    if-gez p1, :cond_1

    add-double/2addr p3, v2

    .line 380
    :cond_1
    invoke-static {v0, v1, p3, p4}, Ljava/lang/Math;->min(DD)D

    move-result-wide p1

    return-wide p1
.end method

.method private getPointOfIntersectionToLastBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)I
    .locals 8

    .line 392
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {p0, p1, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    .line 393
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {p0, p2, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    .line 409
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-ge v2, v3, :cond_0

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    goto :goto_0

    :cond_0
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    :goto_0
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    const/4 v3, 0x1

    sub-int/2addr v2, v3

    :goto_1
    const/4 v4, 0x0

    if-lez v2, :cond_3

    .line 413
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v5

    if-ge v2, v5, :cond_1

    .line 415
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v5, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    add-int/lit8 v7, v2, -0x1

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    invoke-direct {p0, v5, v6}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    .line 416
    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v6, v1, v5}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linesIntersectionPoint([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    if-eqz v5, :cond_1

    .line 418
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, v5, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p2, v2, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 419
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    add-int/2addr v2, v3

    invoke-interface {p2, v4, v2}, Ljava/util/List;->subList(II)Ljava/util/List;

    move-result-object p2

    iput-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    .line 420
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, p1, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    const/4 v3, 0x2

    goto :goto_2

    .line 426
    :cond_1
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v5

    if-ge v2, v5, :cond_2

    .line 427
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v5, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    add-int/lit8 v7, v2, -0x1

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    invoke-direct {p0, v5, v6}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    .line 428
    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v6, v0, v5}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linesIntersectionPoint([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    if-eqz v5, :cond_2

    .line 430
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, v5, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p1, v2, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 431
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    add-int/2addr v2, v3

    invoke-interface {p1, v4, v2}, Ljava/util/List;->subList(II)Ljava/util/List;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    .line 432
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, p2, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_2

    :cond_2
    add-int/lit8 v2, v2, -0x1

    goto/16 :goto_1

    :cond_3
    const/4 v3, 0x0

    :goto_2
    return v3
.end method

.method private ifAfterStart(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 13

    .line 197
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    .line 198
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    .line 200
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/LatLng;

    .line 202
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v1, v0, p1}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->lineSegmentBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v10

    .line 204
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v7, 0x4056800000000000L    # 90.0

    move-object v2, v0

    move-wide v3, v10

    invoke-virtual/range {v1 .. v8}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v12

    .line 205
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v7, -0x3fa9800000000000L    # -90.0

    invoke-virtual/range {v1 .. v8}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    .line 207
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v8, 0x4056800000000000L    # 90.0

    move-object v3, p1

    move-wide v4, v10

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    .line 208
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v8, -0x3fa9800000000000L    # -90.0

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    .line 211
    invoke-direct {p0, v2, v1, v12, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->setSprayPolygonOptions(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    .line 213
    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    add-int/lit8 v6, v6, -0x1

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v12, v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 214
    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    add-int/lit8 v6, v6, -0x1

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v0, v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 215
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    new-instance v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v4, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v5

    add-int/lit8 v5, v5, -0x1

    invoke-interface {v4, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v3, v1, v4}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 216
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    new-instance v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    add-int/lit8 v4, v4, -0x1

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v1, v2, v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 218
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 219
    iput-wide v10, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lastbearing:D

    return-void
.end method

.method private ifStart(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 1

    .line 184
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    .line 185
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 187
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    if-nez p1, :cond_0

    .line 188
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    .line 190
    :cond_0
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    return-void
.end method

.method private isFinalSelfIntersectsOrhaveTooMuchPoints()Z
    .locals 10

    .line 268
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    const/4 v1, 0x0

    if-eqz v0, :cond_7

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    const/4 v2, 0x2

    if-lt v0, v2, :cond_7

    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    if-eqz v0, :cond_7

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge v0, v2, :cond_0

    goto/16 :goto_1

    .line 274
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    sget v3, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->MAX_POINTS_IN_POLY:I

    const/4 v4, 0x1

    if-le v0, v3, :cond_1

    return v4

    .line 278
    :cond_1
    new-array v0, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v2

    invoke-interface {v3, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    aput-object v3, v0, v1

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v4

    invoke-interface {v3, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    aput-object v3, v0, v4

    .line 279
    new-array v3, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v2

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    aput-object v5, v3, v1

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v4

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    aput-object v5, v3, v4

    .line 280
    new-array v5, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v4

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    aput-object v6, v5, v1

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v4

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    aput-object v6, v5, v4

    .line 281
    new-array v6, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v8

    sub-int/2addr v8, v2

    invoke-interface {v7, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v7}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v7

    aput-object v7, v6, v1

    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v8

    sub-int/2addr v8, v2

    invoke-interface {v7, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v7}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v7

    aput-object v7, v6, v4

    .line 285
    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v7, v5, v6}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v6

    if-eqz v6, :cond_2

    .line 287
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 288
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v2

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v4

    invoke-interface {v2, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    invoke-interface {v1, v3, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 289
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v2

    sub-int/2addr v2, v4

    invoke-interface {v1, v2, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 290
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->recalculateFinnal()V

    return v4

    .line 294
    :cond_2
    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v6, v0, v3}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v6

    if-eqz v6, :cond_3

    .line 296
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 297
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v2

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v2

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    invoke-interface {v1, v3, v5}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 298
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v2

    invoke-interface {v1, v3, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 299
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->recalculateFinnal()V

    return v4

    :cond_3
    const/4 v6, 0x1

    .line 305
    :goto_0
    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v7

    if-ge v6, v7, :cond_7

    .line 307
    new-array v7, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    add-int/lit8 v9, v6, -0x1

    invoke-interface {v8, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/google/android/gms/maps/model/LatLng;

    aput-object v8, v7, v1

    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    invoke-interface {v8, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/google/android/gms/maps/model/LatLng;

    aput-object v8, v7, v4

    .line 310
    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v8, v0, v7}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-eqz v8, :cond_4

    invoke-direct {p0, v0, v7}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-nez v8, :cond_4

    return v4

    .line 312
    :cond_4
    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v8, v3, v7}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-eqz v8, :cond_5

    invoke-direct {p0, v3, v7}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-nez v8, :cond_5

    return v4

    .line 314
    :cond_5
    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v8, v5, v7}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-eqz v8, :cond_6

    invoke-direct {p0, v5, v7}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v7

    if-nez v7, :cond_6

    return v4

    :cond_6
    add-int/lit8 v6, v6, 0x1

    goto :goto_0

    :cond_7
    :goto_1
    return v1
.end method

.method private isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z
    .locals 4

    const/4 v0, 0x0

    .line 323
    aget-object v1, p1, v0

    aget-object v2, p2, v0

    const/4 v3, 0x1

    if-eq v1, v2, :cond_1

    aget-object v1, p1, v3

    aget-object v2, p2, v0

    if-eq v1, v2, :cond_1

    aget-object v1, p1, v3

    aget-object v2, p2, v3

    if-eq v1, v2, :cond_1

    aget-object p1, p1, v0

    aget-object p2, p2, v3

    if-ne p1, p2, :cond_0

    goto :goto_0

    :cond_0
    return v0

    :cond_1
    :goto_0
    return v3
.end method

.method private recalculateFinnal()V
    .locals 4

    .line 248
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 249
    :goto_0
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-ge v1, v2, :cond_0

    .line 250
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 252
    :cond_0
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    :goto_1
    if-ltz v1, :cond_1

    .line 253
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v1, v1, -0x1

    goto :goto_1

    .line 255
    :cond_1
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 256
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method private redrawPolygon()V
    .locals 4

    .line 337
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x1

    sub-int/2addr v1, v2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 338
    invoke-static {}, Llt/noframe/gpsfarmguide/AppPermissions;->isTesting()Z

    move-result v0

    if-eqz v0, :cond_0

    const/high16 v0, -0x10000

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 340
    :goto_0
    new-instance v1, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-direct {v1}, Lcom/google/android/gms/maps/model/PolygonOptions;-><init>()V

    iget v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->color:I

    .line 341
    invoke-virtual {v1, v3}, Lcom/google/android/gms/maps/model/PolygonOptions;->fillColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 342
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 v0, 0x40000000    # 2.0f

    .line 343
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeWidth(F)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 344
    invoke-virtual {v1, v2}, Lcom/google/android/gms/maps/model/PolygonOptions;->geodesic(Z)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 345
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->addAll(Ljava/lang/Iterable;)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 346
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v2

    invoke-interface {v0, v3, v1}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    return-void
.end method

.method private setSprayPolygonOptions(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 3

    .line 359
    invoke-static {}, Llt/noframe/gpsfarmguide/AppPermissions;->isTesting()Z

    move-result v0

    if-eqz v0, :cond_0

    const/high16 v0, -0x10000

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 361
    :goto_0
    new-instance v1, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-direct {v1}, Lcom/google/android/gms/maps/model/PolygonOptions;-><init>()V

    iget v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->color:I

    .line 362
    invoke-virtual {v1, v2}, Lcom/google/android/gms/maps/model/PolygonOptions;->fillColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 363
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 v0, 0x40000000    # 2.0f

    .line 364
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeWidth(F)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/4 v0, 0x1

    .line 365
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->geodesic(Z)Lcom/google/android/gms/maps/model/PolygonOptions;

    iput-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayedPolyOptions:Lcom/google/android/gms/maps/model/PolygonOptions;

    if-eqz p3, :cond_1

    if-eqz p4, :cond_1

    .line 368
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayedPolyOptions:Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v0, p4}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v0, p1}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v0, p2}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v0, p3}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayedPolyOptions:Lcom/google/android/gms/maps/model/PolygonOptions;

    goto :goto_1

    .line 370
    :cond_1
    iget-object p3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayedPolyOptions:Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {p3, p1}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {p3, p2}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    iput-object p3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayedPolyOptions:Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 372
    :goto_1
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayedPolyOptions:Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 374
    iget-wide p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->area:D

    iget-wide p3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->currentArea:D

    add-double/2addr p1, p3

    iput-wide p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->area:D

    return-void
.end method


# virtual methods
.method public getArea()D
    .locals 4

    .line 453
    iget-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->area:D

    iget-wide v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->currentArea:D

    add-double/2addr v0, v2

    return-wide v0
.end method

.method public getPoly()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/PolygonOptions;",
            ">;"
        }
    .end annotation

    .line 462
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->poly:Ljava/util/List;

    return-object v0
.end method

.method public pauseSpraying()V
    .locals 1

    .line 170
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    .line 171
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->finalls:Ljava/util/List;

    return-void
.end method

.method public sprayPoint(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 22

    move-object/from16 v1, p0

    move-object/from16 v0, p1

    .line 65
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    if-eqz v2, :cond_11

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    const/4 v10, 0x1

    if-ge v2, v10, :cond_0

    goto/16 :goto_9

    .line 72
    :cond_0
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    const/4 v11, 0x2

    if-ge v2, v11, :cond_1

    .line 74
    invoke-direct/range {p0 .. p1}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->ifAfterStart(Lcom/google/android/gms/maps/model/LatLng;)V

    return-void

    .line 78
    :cond_1
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    sub-int/2addr v4, v10

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/google/android/gms/maps/model/LatLng;

    invoke-virtual {v2, v3, v0}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->distanceBetween(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v2

    const-wide v4, 0x3fffd70a3d70a3d7L    # 1.99

    cmpg-double v6, v2, v4

    if-gez v6, :cond_2

    return-void

    .line 83
    :cond_2
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    sub-int/2addr v4, v10

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/google/android/gms/maps/model/LatLng;

    invoke-virtual {v2, v3, v0}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->lineSegmentBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v2

    iput-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearing:D

    .line 87
    iget-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearing:D

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lastbearing:D

    invoke-direct {v1, v2, v3, v4, v5}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->getDifference(DD)D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Math;->abs(D)D

    move-result-wide v2

    sget-wide v4, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearingTolerance:D

    const/4 v12, 0x0

    cmpg-double v6, v2, v4

    if-gez v6, :cond_3

    const/4 v13, 0x1

    goto :goto_0

    :cond_3
    const/4 v13, 0x0

    .line 91
    :goto_0
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearing:D

    iget-wide v6, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v8, 0x4056800000000000L    # 90.0

    move-object/from16 v3, p1

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    iput-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    .line 92
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearing:D

    iget-wide v6, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v8, -0x3fa9800000000000L    # -90.0

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    iput-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    if-eqz v13, :cond_4

    .line 96
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-le v2, v10, :cond_4

    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-le v2, v10, :cond_4

    .line 98
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v10

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v5, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3, v4}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 99
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v10

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v5, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3, v4}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    goto :goto_1

    .line 103
    :cond_4
    iget-object v14, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v10

    invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    move-object v15, v2

    check-cast v15, Lcom/google/android/gms/maps/model/LatLng;

    iget-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearing:D

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v20, 0x4056800000000000L    # 90.0

    move-wide/from16 v16, v2

    move-wide/from16 v18, v4

    invoke-virtual/range {v14 .. v21}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    .line 104
    iget-object v14, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    sub-int/2addr v4, v10

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    move-object v15, v3

    check-cast v15, Lcom/google/android/gms/maps/model/LatLng;

    iget-wide v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearing:D

    iget-wide v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->sprayWidth:D

    const-wide v20, -0x3fa9800000000000L    # -90.0

    move-wide/from16 v16, v3

    move-wide/from16 v18, v5

    invoke-virtual/range {v14 .. v21}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    .line 105
    invoke-direct {v1, v3, v2}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->getPointOfIntersectionToLastBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)I

    move-result v12

    .line 109
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-direct {v1, v2, v0, v3, v10}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->findIntersectionIndx(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Ljava/util/List;I)Z

    move-result v2

    if-nez v2, :cond_5

    .line 110
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    new-instance v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v3, v4, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 114
    :cond_5
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-direct {v1, v2, v0, v3, v10}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->findIntersectionIndx(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Ljava/util/List;I)Z

    move-result v2

    if-nez v2, :cond_6

    .line 115
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    new-instance v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v3, v4, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 118
    :cond_6
    :goto_1
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->mids:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 120
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->recalculateFinnal()V

    .line 123
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->isFinalSelfIntersectsOrhaveTooMuchPoints()Z

    move-result v0

    if-eqz v0, :cond_f

    const/4 v2, 0x0

    if-ne v12, v10, :cond_7

    .line 129
    :try_start_0
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    add-int/lit8 v3, v3, -0x3

    invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;
    :try_end_0
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_0 .. :try_end_0} :catch_0

    move-object v3, v0

    goto :goto_2

    :catch_0
    move-exception v0

    move-object v3, v2

    goto :goto_3

    :cond_7
    move-object v3, v2

    :goto_2
    if-ne v12, v11, :cond_8

    .line 132
    :try_start_1
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    add-int/lit8 v4, v4, -0x3

    invoke-interface {v0, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;
    :try_end_1
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_4

    :catch_1
    move-exception v0

    .line 136
    :goto_3
    invoke-virtual {v0}, Ljava/lang/IndexOutOfBoundsException;->printStackTrace()V

    :cond_8
    move-object v0, v2

    .line 139
    :goto_4
    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v11

    invoke-interface {v4, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 140
    iget-object v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v11

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 142
    iget-object v6, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v10

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 143
    iget-object v7, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v8

    sub-int/2addr v8, v10

    invoke-interface {v7, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 145
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    iput-object v8, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    .line 146
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    iput-object v8, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    if-eqz v3, :cond_9

    .line 148
    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v8

    goto :goto_5

    :cond_9
    invoke-virtual {v4}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v8

    :goto_5
    if-eqz v0, :cond_a

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v9

    goto :goto_6

    :cond_a
    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v9

    :goto_6
    invoke-direct {v1, v8, v9, v2, v2}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->setSprayPolygonOptions(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    .line 150
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    if-eqz v3, :cond_b

    move-object v8, v3

    goto :goto_7

    :cond_b
    move-object v8, v4

    :goto_7
    invoke-interface {v2, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 151
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    if-eqz v0, :cond_c

    move-object v8, v0

    goto :goto_8

    :cond_c
    move-object v8, v5

    :goto_8
    invoke-interface {v2, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    if-eqz v3, :cond_d

    .line 153
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_d
    if-eqz v0, :cond_e

    .line 154
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v0, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 156
    :cond_e
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->rights:Ljava/util/List;

    invoke-interface {v0, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 157
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lefts:Ljava/util/List;

    invoke-interface {v0, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 159
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->recalculateFinnal()V

    .line 162
    :cond_f
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->redrawPolygon()V

    if-nez v13, :cond_10

    .line 163
    iget-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->bearing:D

    iput-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->lastbearing:D

    .line 164
    :cond_10
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->calculateCurrentPolygonArea()D

    move-result-wide v2

    iput-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->currentArea:D

    return-void

    .line 67
    :cond_11
    :goto_9
    invoke-direct/range {p0 .. p1}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayDisplayer;->ifStart(Lcom/google/android/gms/maps/model/LatLng;)V

    return-void
.end method
